import gtk
import gobject
import ftpmod

def define_widgets(self, gladefile):
    self.AbMainWindow = gladefile.get_widget('AbsynthFull')
    self.remote_treeview = gladefile.get_widget('remotetree')
    self.remote_path = gladefile.get_widget('remotepath')
    self.local_treeview = gladefile.get_widget('localtree')
    self.local_path = gladefile.get_widget('localpath')
    self.host = gladefile.get_widget('hostentry')
    self.user = gladefile.get_widget('userentry')
    self.password = gladefile.get_widget('passwordentry')
    self.connectbutton = gladefile.get_widget('connectbutton')
    self.logtextview = gladefile.get_widget('logtextview')
    self.localpath_combo = gladefile.get_widget('comboboxentry3')
    self.dw_treeview = gladefile.get_widget('treeview2')
    
    #Handlers 
    self.connection.connect("dirchanged", self.remote_update)

    dic = {
           "on_about" : self.about_dialog,
           
           "on_connectbutton_clicked" : self.on_connect,
           "on_hostentry_key_press_event" : self.connect_enter,
           
           "on_remotetree_button_press_event" : self.remote_treeview_button_press_event,
           "on_remotetree_row_activated" : self.remote_treeview_clicked,
           "on_remoteup_clicked" : self.remote_up,
           
           "on_localtree_row_activated" : self.local_treeview_clicked,
           "on_localtree_button_press_event" : self.local_treeview_button_press_event,
           "on_localup_clicked" : self.local_up,
           
           "on_wizardbutton_clicked" : self.assistant.make,
           "on_destroy" : gtk.main_quit
           }

    gladefile.signal_autoconnect(dic)